<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <table id="Table2XLSX">
    <tbody>
      <tr>
        <td>Author</td>
        <td>ID</td>
        <td>你好!</td>
      </tr>
      <tr>
        <td>SheetJS</td>
        <td>7262</td>
        <td>வணக்கம்!</td>
      </tr>
      <tr>
        <td>SheetJS</td>
        <td>7262</td>
        <td>வணக்கம்!</td>
      </tr>
    </tbody>
  </table>
  <button class="btn"><b>Export XLSX!</b></button>
  <script src="https://cdn.sheetjs.com/xlsx-0.19.3/package/dist/xlsx.full.min.js"></script>
  <script>
    document.querySelector('.btn').addEventListener('click', function Table2XLSX(props) {
      const table = document.getElementById("Table2XLSX");
      const wb = XLSX.utils.table_to_book(table);
      XLSX.writeFile(wb, "SheetJSTable.xlsx");
    })
  </script>
</body>

</html>